<template>
  <div class="easy-container-1 border-bottom">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item v-for="item in items" :key="item.path">
        <router-link :to="item.path">{{ item.label }}</router-link>
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>

<script>
import { mapState } from 'vuex';

export default {
  name: 'breadcrumb', // 意见反馈面包屑导航
  computed: {
    ...mapState({ feedback: 'currentFeedback' }),
    items() {
      const label = {
        FeedbackShow: this.feedback.title,
        FeedbackCreate: '新建反馈',
      }[this.$route.matched[0].name];
      return [
        { path: '/feedback', label: '反馈列表' },
        { path: '/feedback/1', label },
      ];
    },
  },
};
</script>

<style></style>
